#include "Vector3D.h"
#include <iostream>
#include <cassert>
using namespace std;

void printVector3D(Vector3D& p_v) {
	cout << "Vector3D: (" << p_v.x << ", " << p_v.y << ", " << p_v.z << ")" << endl;
}



int main () {
	assert( Vector3D(1, 3, 4) == (Vector3D() = Vector3D(1, 3, 4)) );

	assert( Vector3D(1.2, 3.2, 2) == Vector3D(1.2, 3.2, 2) );


	cout << "vec1 created" << endl;	
	Vector3D vec1 = Vector3D(0.1f, 2.3f, 5.0f);
	printVector3D(vec1);

	cout << "vec2 created" << endl;
	Vector3D vec2 = Vector3D(1, 2, 3);
	printVector3D(vec2);

	vec2 = vec1;
	cout << "vec2 after vec2 = vec1" << endl;
	printVector3D(vec2);

	if(vec2 == vec1) {
		cout << "vec2 == vec1 is true" << endl;
	}

	cout << "vec1 negated" << endl;
	printVector3D(-vec1);

	cout << "vec1 + vec2" << endl;
	printVector3D(vec1 + vec2);

	cout << "vec1 - vec2" << endl;
	printVector3D(vec1 - vec2);

	cout << "vec1 * 2 " << endl;
	printVector3D(vec1 * 2);

	cout << "-2 * vec1" << endl;
	printVector3D(-2 * vec1);

	cout << "vec2 / 2" << endl;
	printVector3D(vec2/2);

	cout << "vec1 += vec2" << endl;
	vec1 += vec2;
	printVector3D(vec1);

	cout << "vec1.normalize()" << endl;
	vec1.normalize();
	printVector3D(vec1);

	cout << "vectorMag3D(vec1)" << endl;
	cout << vectorMag3D(vec1) << endl;

	vec2.normalize();
	cout << "vec1 dot vec2.normalize()" << endl;
	cout << vec1*vec2 << endl;
	Vector3D Vec1CrossVec2 = crossProduct(vec1, vec2);
	cout << "(0, 1, 0) cross (1, 0, 0)" << endl;
	printVector3D(crossProduct(Vector3D(0, 1, 0), Vector3D(1, 0, 0)));

	

	int end;
	cin >> end;

	return 0;
}



